home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10016 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  979 b 

  1. Path: newshost.cyberramp.net!news
  2. From: sinan@cyberramp.net (John Noland)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Invalid Indirection???
  5. Date: 15 Mar 1996 01:31:31 GMT
  6. Organization: Prose Software
  7. Message-ID: <4iah9k$r02@newshost.cyberramp.net>
  8. References: <4i7cck$t67@infa.central.susx.ac.uk>
  9. NNTP-Posting-Host: ramp2-29.cyberramp.net
  10. X-Newsreader: WinVN 0.99.5
  11.  
  12. In article <4i7cck$t67@infa.central.susx.ac.uk>, taux5@central.susx.ac.uk says...
  13. >
  14. > tmp = (tempi[i]*tempj[i])+(tempi[i+1]*tempj[i+1]));
  15. >        
  16. >/* This is where the compiler stops and says there's an invalid
  17. >indirection for the "tmp" assignment */
  18.  
  19. To multiply, you need whitespace. Check the lexical conventions for the
  20. evaluation of tokens for your compiler to be certain, but it looks like 
  21. you've confused him.
  22. Also, your open/closed parentheses don't match in this statement.
  23.  
  24. Your statement should like this (underscores indicate spaces):
  25.  
  26. tmp = ((tempi[i]_*_tempj[i]) + (tempi[i+1]_*_tempj[i+1]))
  27.  
  28. -John
  29.  
  30.